package com.example.headfirstprojectdemo.observer.javaweatherStation;

import java.util.ArrayList;
import java.util.List;
import java.util.Observable;
import java.util.Observer;

public class WeatherData extends Observable {

    private float temperature;
    private float humidity;
    private float pressure;
    public WeatherData(){

    }





    public void measurementsChanged(){
       setChanged();
       notifyObservers();
    }
    public void  setMeasurements(float temperature ,float humidity , float pressure){
        this.temperature = temperature;
        this.humidity = humidity;
        this.pressure = pressure;
        this.measurementsChanged();
    }

    public float getTemperature() {
        return temperature;
    }

    public float getHumidity() {
        return humidity;
    }

    public float getPressure() {
        return pressure;
    }
}
